Repository navigation
feat: unified CLI installer and operations manager (./install.sh) - #75
Merged
Merged
Conversation
- Add thin root bootstrapper ./install.sh (non-root guard, Python 3.11-3.13 detection) and pure-stdlib lpt_installer package. - Registry covers all 19 scripts with risk tiers, host profiles (node/vps), supported execution modes, config requirements, and legacy unit metadata. - Supports uv fast-path + stdlib venv fallback, OS CA trust bundle bindings (SSL_CERT_FILE/REQUESTS_CA_BUNDLE) across all systemd units and cron blocks, systemd sandboxing (ProtectSystem=full / strict for HTTP-only pocketmoney), TimeoutStartSec=300, and flock-guarded cron blocks. - Adds fail-closed unmanaged duplicate detection, .lpt-backups/ snapshots, legacy unit migration, guided chmod 600 config copy + placeholder validation, clean uninstall preserving configs by default, MIT/self-verify disclaimer, and subtle hodlmetight.org footer. - Remove legacy LNBits/install_pocketmoney_service.sh and Other/install_fee_adjuster_service.sh; update tests/test_ca_trust_hardening.py, add tests/test_lpt_installer.py (87.90% coverage on lpt_installer), and add systemd-analyze verify + 85% coverage gates in CI.
🛡️⚡ TunnelSentinel Code ReviewVerdict: Latest commit: Targeted Re-Review Summary (Commit
|
- lpt_installer/configs.py: reject INVOICEID*, INVOICEKEY*, empty, and non-string values for wallets.json wallet_id/invoice_key. - lpt_installer/adapters.py: degrade gracefully when crontab binary is missing (return empty crontab on read, succeed on empty write, clear error on non-empty cron write). - lpt_installer/scheduler.py: only pass tool.unattended_args (--run-once) in systemd-timer mode (not systemd-service daemon mode), move cron flock lock file from /tmp into 0700 repo logs/, ignore managed MainPID when re-installing an active lpt-* daemon, and run systemctl try-restart after service unit updates. - lpt_installer/cli.py: catch KeyError for unknown tool IDs across config, install, and uninstall subcommands. - tests/test_lpt_installer.py: add regression tests for all 6 findings (223/223 passing, 88.80% lpt_installer coverage).
tunnelsentinel
Bot
dismissed
their stale review
November 26, 2026 21:48
Superseded by a clean TunnelSentinel review of commit ea4f510, the current head of this pull request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
PR 2 of the phased Lightning-Python-Tools optimization plan — replaces the two standalone shell installers with a unified, pure-stdlib installer and operations manager (
./install.sh+lpt_installer/):./install.sh,lpt_installer/):install.sh: non-root guard, Python3.11–3.13detection, delegates topython3 -m lpt_installer.lpt_installer/registry.py: single-source-of-truthToolSpecregistry for all 19 scripts (risk tier, host profilenode/vps, supported scheduling modes, unattended args, required configs, legacy units).lpt_installer/env.py: unified.venvsetup (uvfast-path with stdlibvenvfallback, optionaldbextra foroffline_summary.py) +doctordiagnostics (Python,certifi, OS CA bundle,0o600config perms, root-owned runtime files, legacy units).lpt_installer/configs.py: non-clobbering copy from*.example,chmod 600on configs (chmod 700onlogs//data/),$VISUAL/$EDITORlaunch, and placeholder/schema validation.lpt_installer/scheduler.py: hardenedlpt-*systemdservices/timers (SSL_CERT_FILE,REQUESTS_CA_BUNDLE,TimeoutStartSec=300,ProtectSystem=full/strict, explicitPATH) and idempotent managed-blockcron(flock -n), fail-closed unmanaged duplicate detector,.lpt-backups/pre-change snapshots, automatic migration of legacypocketmoney.*/fee_adjuster.*/etc., and cleanuninstallpreserving user configs by default.lpt_installer/cli.py: interactive numbered menu with overview table + scriptable subcommands (list,status,env,config,install,uninstall,doctor), MIT/self-verify disclaimer acknowledgment,[FUNDS]banner, andhttps://hodlmetight.orgfooter.LNBits/install_pocketmoney_service.shandOther/install_fee_adjuster_service.shand updated direct references.tests/test_ca_trust_hardening.pyto verify all generated systemd units and cron blocks, addedtests/test_lpt_installer.py(87.90%coverage onlpt_installer), and addedsystemd-analyze verify+>=85%lpt_installercoverage gate in.github/workflows/tests.yml.Verification
.venv/bin/pytest tests/ -v --cov=... --cov-fail-under=35: 222 passed (47.73%total coverage)..venv/bin/pytest tests/test_lpt_installer.py tests/test_ca_trust_hardening.py --cov=lpt_installer --cov-fail-under=85: 14 passed (87.90%coverage).bash -n install.sh,./install.sh list,.venv/bin/python -m pip_audit: all passed.greptile-guard), so this PR is verified via GitHub Actions CI + TunnelSentinel.